<template>
	<view>
		<uni-navbar :title="'我的业绩'"></uni-navbar>

		<view class="m-header">
			<view :class="navIndex == 0 ? 'bg-color' : ''" @click="changeNav(0)">面授课业绩</view>
			<view :class="navIndex == 1 ? 'bg-color' : ''" @click="changeNav(1)">网课业绩</view>
		</view>

		<view class="m-block">
			<view class="m-b-1">
				<view>今日实收</view>
				<view>0元</view>
				<view>订单数：0</view>
			</view>
			<view class="m-b-1">
				<view>本周实收</view>
				<view>6280元</view>
				<view>订单数：5</view>
			</view>
			<view class="m-b-1">
				<view>本月实收</view>
				<view>7899元</view>
				<view>订单数：55</view>
			</view>
		</view>

		<!-- 筛选 -->
		<view class="shaixuan">
			<view class="s-search">
				<u-search v-model="keywords" input-align="left" placeholder="搜索客户姓名或者电话" :action-text="'查询'"
					height="50"></u-search>
			</view>
			<view class="s-s" @click="show = true">
				<image src="../../../static/application/qici/shaixuan.png" mode=""></image>筛选
			</view>
		</view>
		<!-- 内容 -->
		<view class="block" v-for="(item,index) in 3" :key="index">
			<view class="b-1">
				<view>南京儿牙</view>
				<view>已确认</view>
			</view>
			<view class="b-2">
				课程顾问信息：李四
				</image>
			</view>
			<view class="b-2">
				客户信息：李四132566447447 <image @click="copy('客户信息')" src="../../../static/application/copy.png" mode="">
				</image>
			</view>
			<view class="b-2">
				订单号：CRM32143544434387345343 <image @click="copy('订单号')" src="../../../static/application/copy.png"
					mode=""></image>
			</view>
			<view class="b-2">
				下单时间：2022-08-23 11:46
			</view>
			<view class="b-2 color">
				缴费方式：线上支付 支付宝
			</view>
			<view class="b-2">
				缴费金额：2280元
			</view>
		</view>

		<!-- 筛选 -->
		<u-popup v-model="show" mode="bottom">
			<view class="pop-block">
				<u-form :model="form" label-width="180" label-align="right" :border-bottom="false">
					<u-form-item label="自定义时间:" :border-bottom="false">
						<view class="f-time">
							<view class="start-time">
								<u-input border v-model="form.startTime" input-align="center" disabled
									@click="startShow = true" placeholder="开始时间" />
							</view>
							<view class="start-">至</view>
							<view class="stop-time">
								<u-input border v-model="form.stopTime" input-align="center" disabled
									@click="stopShow = true" placeholder="结束时间" />
							</view>
						</view>
					</u-form-item>
					<u-form-item label="付款方式:" prop="xiaoqu" :border-bottom="false">
						<u-input border v-model="form.payType" type="select" disabled @click="payTypeShow = true"
							placeholder="请选择内容" />
					</u-form-item>
					<u-form-item label="手动入账:" prop="money" :border-bottom="false">
						<image class="f-img" src="../../../static/application/checked.png" mode=""></image>
						<!-- <image class="f-img" src="../../../static/application/checked_select.png" mode=""></image> -->
					</u-form-item>
				</u-form>
			</view>
			<view class="p-bottom">
				<view>重置</view>
				<view>确认</view>
			</view>
		</u-popup>
		<!-- 付款方式 -->
		<u-select v-model="payTypeShow" :list="payTypeList"></u-select>
		<!-- 开始时间 -->
		<u-picker mode="time" v-model="startShow"></u-picker>
		<!-- 结束时间 -->
		<u-picker mode="time" v-model="stopShow"></u-picker>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				navIndex: 0,
				keywords: '',
				show: false,
				form: {
					payType: '',
					time: '',
					startTime: '',
					stopTime: '',
					money: false
				},
				payTypeShow: false,
				payTypeList: [{
						value: '1',
						label: '江'
					},
					{
						value: '2',
						label: '湖'
					}
				],
				startShow: false,
				stopShow: false
			};
		},
		methods: {
			changeNav(e) {
				if (this.navIndex == e) return;
				this.navIndex = e
			},
			// 复制
			copy(data) {
				uni.setClipboardData({
					data: data,
					success() {
						uni.showToast({
							icon: 'none',
							title: '复制成功'
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.m-header {
		width: 750rpx;
		height: 80rpx;
		border-bottom: 2rpx solid #008EFE;
		padding-top: 20rpx;
		background-color: #fff;
		padding-left: 30rpx;
		display: flex;

		view {
			width: 228rpx;
			height: 60rpx;
			border-radius: 8rpx 8rpx 0 0;
			text-align: center;
			line-height: 60rpx;
			font-size: 30rpx;
			font-family: Source Han Sans SC;
			font-weight: bold;
		}

		.bg-color {
			background: #008EFE;
			color: #fff;
		}
	}

	.m-block {
		background-color: #fff;
		font-size: 26rpx;
		font-family: Source Han Sans SC;
		font-weight: 400;
		color: #4D4D4D;
		display: flex;
		justify-content: space-around;
		padding: 20rpx 30rpx;
		line-height: 50rpx;

		.m-b-1 {}
	}

	.shaixuan {
		width: 100%;
		background-color: #fff;
		display: flex;
		justify-content: space-between;
		padding: 20rpx;
		margin: 20rpx 0;

		.s-search {
			width: 600rpx;
		}

		.s-s {
			line-height: 54rpx;
			color: #999999;

			image {
				width: 28rpx;
				height: 26rpx;
				margin-right: 6rpx;
			}
		}
	}

	.block {
		background-color: #fff;
		padding: 30rpx;
		font-size: 24px;
		color: #999999;
		border-bottom: 1rpx solid #e6e6e6;

		.b-1 {
			display: flex;
			justify-content: space-between;

			view:nth-child(1) {
				font-size: 28rpx;
				font-family: Source Han Sans SC;
				font-weight: 600;
				color: #4D4D4D;
			}

			view:nth-child(2) {
				width: 88rpx;
				height: 30rpx;
				background: #CDE7FF;
				border-radius: 13rpx;
				font-size: 20rpx;
				font-family: Source Han Sans SC;
				font-weight: 400;
				color: #008EFE;
				text-align: center;
			}
		}

		.b-2 {
			font-size: 24rpx;
			line-height: 60rpx;

			image {
				width: 24rpx;
				height: 24rpx;
				margin-left: 10rpx;
			}
		}

		.color {
			color: #E02D38;
		}
	}

	.pop-block {
		padding: 20rpx 30rpx;
	}

	.f-time {
		display: flex;
		justify-content: space-between;

		.start- {
			padding: 0 20rpx;
		}
	}

	.p-bottom {
		display: flex;
		text-align: center;
		line-height: 80rpx;

		view:nth-child(1) {
			width: 50%;
			height: 80rpx;
			background-color: #e7e7e7;
		}

		view:nth-child(2) {
			width: 50%;
			height: 80rpx;
			background-color: #1e5ff5;
			color: #fff;
		}
	}
	
	.f-img{
		width: 45rpx;
		height: 45rpx;
	}
</style>
